﻿namespace NPattern.Tests.AbstractFactory
{
    using System;
    using NPattern.AbstractFactory;

    public class SampleMaker : IMaker<Sample>
    {
        public enum MyEnum
        {
            One, Two
        }

        public Sample Instance(object enumeration)
        {
            switch ((MyEnum)enumeration)
            {
                case MyEnum.One:
                    return new Sample { Id = Guid.NewGuid() };
                case MyEnum.Two:
                    return new Sample { Id = Guid.Empty };
                default:
                    return default(Sample);
            }
        }
    }
}
